import { Pipe, PipeTransform } from '@angular/core';

@Pipe({
  name: 'ellipsis'
})
export class EllipsisPipe implements PipeTransform {

  transform(value: string, ...args: any[]): unknown {
    if (!value) return '';
    const spLength: number = args[0];
    const spChart: string = args[1];


    return value.substr(0, spLength) + spChart;
  }

}
